(0) Obligation:

Clauses:

p(.(X, [])).
p(.(s(s(X)), .(Y, Xs))) :- ','(p(.(X, .(Y, Xs))), p(.(s(s(s(s(Y)))), Xs))).
p(.(0, Xs)) :- p(Xs).

Query: p(g)

(1) PrologToPrologProblemTransformerProof (SOUND transformation)

Built Prolog problem from termination graph ICLP10.

(2) Obligation:

Clauses:

pA(.(T3, [])).
pA(.(s(s(s(s(T24)))), .(T25, T26))) :- pA(.(T24, .(T25, T26))).
pA(.(s(s(s(s(T24)))), .(T25, T26))) :- ','(pA(.(T24, .(T25, T26))), pA(.(s(s(s(s(T25)))), T26))).
pA(.(s(s(s(s(T24)))), .(T25, T26))) :- ','(pA(.(T24, .(T25, T26))), ','(pA(.(s(s(s(s(T25)))), T26)), pA(.(s(s(s(s(T25)))), T26)))).
pA(.(s(s(0)), .(T45, T46))) :- pA(.(T45, T46)).
pA(.(s(s(0)), .(T45, T46))) :- ','(pA(.(T45, T46)), pA(.(s(s(s(s(T45)))), T46))).
pA(.(0, .(T59, []))).
pA(.(0, .(s(s(T72)), .(T73, T74)))) :- pA(.(T72, .(T73, T74))).
pA(.(0, .(s(s(T72)), .(T73, T74)))) :- ','(pA(.(T72, .(T73, T74))), pA(.(s(s(s(s(T73)))), T74))).
pA(.(0, .(0, T83))) :- pA(T83).

Query: pA(g)

(3) PrologToPiTRSProof (SOUND transformation)

We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes:
pA_in: (b)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

pA_in_g(.(T3, [])) → pA_out_g(.(T3, []))
pA_in_g(.(s(s(s(s(T24)))), .(T25, T26))) → U1_g(T24, T25, T26, pA_in_g(.(T24, .(T25, T26))))
pA_in_g(.(s(s(0)), .(T45, T46))) → U4_g(T45, T46, pA_in_g(.(T45, T46)))
pA_in_g(.(0, .(T59, []))) → pA_out_g(.(0, .(T59, [])))
pA_in_g(.(0, .(s(s(T72)), .(T73, T74)))) → U6_g(T72, T73, T74, pA_in_g(.(T72, .(T73, T74))))
pA_in_g(.(0, .(0, T83))) → U8_g(T83, pA_in_g(T83))
U8_g(T83, pA_out_g(T83)) → pA_out_g(.(0, .(0, T83)))
U6_g(T72, T73, T74, pA_out_g(.(T72, .(T73, T74)))) → pA_out_g(.(0, .(s(s(T72)), .(T73, T74))))
U6_g(T72, T73, T74, pA_out_g(.(T72, .(T73, T74)))) → U7_g(T72, T73, T74, pA_in_g(.(s(s(s(s(T73)))), T74)))
U7_g(T72, T73, T74, pA_out_g(.(s(s(s(s(T73)))), T74))) → pA_out_g(.(0, .(s(s(T72)), .(T73, T74))))
U4_g(T45, T46, pA_out_g(.(T45, T46))) → pA_out_g(.(s(s(0)), .(T45, T46)))
U4_g(T45, T46, pA_out_g(.(T45, T46))) → U5_g(T45, T46, pA_in_g(.(s(s(s(s(T45)))), T46)))
U5_g(T45, T46, pA_out_g(.(s(s(s(s(T45)))), T46))) → pA_out_g(.(s(s(0)), .(T45, T46)))
U1_g(T24, T25, T26, pA_out_g(.(T24, .(T25, T26)))) → pA_out_g(.(s(s(s(s(T24)))), .(T25, T26)))
U1_g(T24, T25, T26, pA_out_g(.(T24, .(T25, T26)))) → U2_g(T24, T25, T26, pA_in_g(.(s(s(s(s(T25)))), T26)))
U2_g(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → pA_out_g(.(s(s(s(s(T24)))), .(T25, T26)))
U2_g(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → U3_g(T24, T25, T26, pA_in_g(.(s(s(s(s(T25)))), T26)))
U3_g(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → pA_out_g(.(s(s(s(s(T24)))), .(T25, T26)))

Pi is empty.

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(4) Obligation:

Pi-finite rewrite system:
The TRS R consists of the following rules:

pA_in_g(.(T3, [])) → pA_out_g(.(T3, []))
pA_in_g(.(s(s(s(s(T24)))), .(T25, T26))) → U1_g(T24, T25, T26, pA_in_g(.(T24, .(T25, T26))))
pA_in_g(.(s(s(0)), .(T45, T46))) → U4_g(T45, T46, pA_in_g(.(T45, T46)))
pA_in_g(.(0, .(T59, []))) → pA_out_g(.(0, .(T59, [])))
pA_in_g(.(0, .(s(s(T72)), .(T73, T74)))) → U6_g(T72, T73, T74, pA_in_g(.(T72, .(T73, T74))))
pA_in_g(.(0, .(0, T83))) → U8_g(T83, pA_in_g(T83))
U8_g(T83, pA_out_g(T83)) → pA_out_g(.(0, .(0, T83)))
U6_g(T72, T73, T74, pA_out_g(.(T72, .(T73, T74)))) → pA_out_g(.(0, .(s(s(T72)), .(T73, T74))))
U6_g(T72, T73, T74, pA_out_g(.(T72, .(T73, T74)))) → U7_g(T72, T73, T74, pA_in_g(.(s(s(s(s(T73)))), T74)))
U7_g(T72, T73, T74, pA_out_g(.(s(s(s(s(T73)))), T74))) → pA_out_g(.(0, .(s(s(T72)), .(T73, T74))))
U4_g(T45, T46, pA_out_g(.(T45, T46))) → pA_out_g(.(s(s(0)), .(T45, T46)))
U4_g(T45, T46, pA_out_g(.(T45, T46))) → U5_g(T45, T46, pA_in_g(.(s(s(s(s(T45)))), T46)))
U5_g(T45, T46, pA_out_g(.(s(s(s(s(T45)))), T46))) → pA_out_g(.(s(s(0)), .(T45, T46)))
U1_g(T24, T25, T26, pA_out_g(.(T24, .(T25, T26)))) → pA_out_g(.(s(s(s(s(T24)))), .(T25, T26)))
U1_g(T24, T25, T26, pA_out_g(.(T24, .(T25, T26)))) → U2_g(T24, T25, T26, pA_in_g(.(s(s(s(s(T25)))), T26)))
U2_g(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → pA_out_g(.(s(s(s(s(T24)))), .(T25, T26)))
U2_g(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → U3_g(T24, T25, T26, pA_in_g(.(s(s(s(s(T25)))), T26)))
U3_g(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → pA_out_g(.(s(s(s(s(T24)))), .(T25, T26)))

Pi is empty.

(5) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

PA_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → U1_G(T24, T25, T26, pA_in_g(.(T24, .(T25, T26))))
PA_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → PA_IN_G(.(T24, .(T25, T26)))
PA_IN_G(.(s(s(0)), .(T45, T46))) → U4_G(T45, T46, pA_in_g(.(T45, T46)))
PA_IN_G(.(s(s(0)), .(T45, T46))) → PA_IN_G(.(T45, T46))
PA_IN_G(.(0, .(s(s(T72)), .(T73, T74)))) → U6_G(T72, T73, T74, pA_in_g(.(T72, .(T73, T74))))
PA_IN_G(.(0, .(s(s(T72)), .(T73, T74)))) → PA_IN_G(.(T72, .(T73, T74)))
PA_IN_G(.(0, .(0, T83))) → U8_G(T83, pA_in_g(T83))
PA_IN_G(.(0, .(0, T83))) → PA_IN_G(T83)
U6_G(T72, T73, T74, pA_out_g(.(T72, .(T73, T74)))) → U7_G(T72, T73, T74, pA_in_g(.(s(s(s(s(T73)))), T74)))
U6_G(T72, T73, T74, pA_out_g(.(T72, .(T73, T74)))) → PA_IN_G(.(s(s(s(s(T73)))), T74))
U4_G(T45, T46, pA_out_g(.(T45, T46))) → U5_G(T45, T46, pA_in_g(.(s(s(s(s(T45)))), T46)))
U4_G(T45, T46, pA_out_g(.(T45, T46))) → PA_IN_G(.(s(s(s(s(T45)))), T46))
U1_G(T24, T25, T26, pA_out_g(.(T24, .(T25, T26)))) → U2_G(T24, T25, T26, pA_in_g(.(s(s(s(s(T25)))), T26)))
U1_G(T24, T25, T26, pA_out_g(.(T24, .(T25, T26)))) → PA_IN_G(.(s(s(s(s(T25)))), T26))
U2_G(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → U3_G(T24, T25, T26, pA_in_g(.(s(s(s(s(T25)))), T26)))
U2_G(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → PA_IN_G(.(s(s(s(s(T25)))), T26))

The TRS R consists of the following rules:

pA_in_g(.(T3, [])) → pA_out_g(.(T3, []))
pA_in_g(.(s(s(s(s(T24)))), .(T25, T26))) → U1_g(T24, T25, T26, pA_in_g(.(T24, .(T25, T26))))
pA_in_g(.(s(s(0)), .(T45, T46))) → U4_g(T45, T46, pA_in_g(.(T45, T46)))
pA_in_g(.(0, .(T59, []))) → pA_out_g(.(0, .(T59, [])))
pA_in_g(.(0, .(s(s(T72)), .(T73, T74)))) → U6_g(T72, T73, T74, pA_in_g(.(T72, .(T73, T74))))
pA_in_g(.(0, .(0, T83))) → U8_g(T83, pA_in_g(T83))
U8_g(T83, pA_out_g(T83)) → pA_out_g(.(0, .(0, T83)))
U6_g(T72, T73, T74, pA_out_g(.(T72, .(T73, T74)))) → pA_out_g(.(0, .(s(s(T72)), .(T73, T74))))
U6_g(T72, T73, T74, pA_out_g(.(T72, .(T73, T74)))) → U7_g(T72, T73, T74, pA_in_g(.(s(s(s(s(T73)))), T74)))
U7_g(T72, T73, T74, pA_out_g(.(s(s(s(s(T73)))), T74))) → pA_out_g(.(0, .(s(s(T72)), .(T73, T74))))
U4_g(T45, T46, pA_out_g(.(T45, T46))) → pA_out_g(.(s(s(0)), .(T45, T46)))
U4_g(T45, T46, pA_out_g(.(T45, T46))) → U5_g(T45, T46, pA_in_g(.(s(s(s(s(T45)))), T46)))
U5_g(T45, T46, pA_out_g(.(s(s(s(s(T45)))), T46))) → pA_out_g(.(s(s(0)), .(T45, T46)))
U1_g(T24, T25, T26, pA_out_g(.(T24, .(T25, T26)))) → pA_out_g(.(s(s(s(s(T24)))), .(T25, T26)))
U1_g(T24, T25, T26, pA_out_g(.(T24, .(T25, T26)))) → U2_g(T24, T25, T26, pA_in_g(.(s(s(s(s(T25)))), T26)))
U2_g(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → pA_out_g(.(s(s(s(s(T24)))), .(T25, T26)))
U2_g(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → U3_g(T24, T25, T26, pA_in_g(.(s(s(s(s(T25)))), T26)))
U3_g(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → pA_out_g(.(s(s(s(s(T24)))), .(T25, T26)))

Pi is empty.
We have to consider all (P,R,Pi)-chains

(6) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

PA_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → U1_G(T24, T25, T26, pA_in_g(.(T24, .(T25, T26))))
PA_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → PA_IN_G(.(T24, .(T25, T26)))
PA_IN_G(.(s(s(0)), .(T45, T46))) → U4_G(T45, T46, pA_in_g(.(T45, T46)))
PA_IN_G(.(s(s(0)), .(T45, T46))) → PA_IN_G(.(T45, T46))
PA_IN_G(.(0, .(s(s(T72)), .(T73, T74)))) → U6_G(T72, T73, T74, pA_in_g(.(T72, .(T73, T74))))
PA_IN_G(.(0, .(s(s(T72)), .(T73, T74)))) → PA_IN_G(.(T72, .(T73, T74)))
PA_IN_G(.(0, .(0, T83))) → U8_G(T83, pA_in_g(T83))
PA_IN_G(.(0, .(0, T83))) → PA_IN_G(T83)
U6_G(T72, T73, T74, pA_out_g(.(T72, .(T73, T74)))) → U7_G(T72, T73, T74, pA_in_g(.(s(s(s(s(T73)))), T74)))
U6_G(T72, T73, T74, pA_out_g(.(T72, .(T73, T74)))) → PA_IN_G(.(s(s(s(s(T73)))), T74))
U4_G(T45, T46, pA_out_g(.(T45, T46))) → U5_G(T45, T46, pA_in_g(.(s(s(s(s(T45)))), T46)))
U4_G(T45, T46, pA_out_g(.(T45, T46))) → PA_IN_G(.(s(s(s(s(T45)))), T46))
U1_G(T24, T25, T26, pA_out_g(.(T24, .(T25, T26)))) → U2_G(T24, T25, T26, pA_in_g(.(s(s(s(s(T25)))), T26)))
U1_G(T24, T25, T26, pA_out_g(.(T24, .(T25, T26)))) → PA_IN_G(.(s(s(s(s(T25)))), T26))
U2_G(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → U3_G(T24, T25, T26, pA_in_g(.(s(s(s(s(T25)))), T26)))
U2_G(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → PA_IN_G(.(s(s(s(s(T25)))), T26))

The TRS R consists of the following rules:

pA_in_g(.(T3, [])) → pA_out_g(.(T3, []))
pA_in_g(.(s(s(s(s(T24)))), .(T25, T26))) → U1_g(T24, T25, T26, pA_in_g(.(T24, .(T25, T26))))
pA_in_g(.(s(s(0)), .(T45, T46))) → U4_g(T45, T46, pA_in_g(.(T45, T46)))
pA_in_g(.(0, .(T59, []))) → pA_out_g(.(0, .(T59, [])))
pA_in_g(.(0, .(s(s(T72)), .(T73, T74)))) → U6_g(T72, T73, T74, pA_in_g(.(T72, .(T73, T74))))
pA_in_g(.(0, .(0, T83))) → U8_g(T83, pA_in_g(T83))
U8_g(T83, pA_out_g(T83)) → pA_out_g(.(0, .(0, T83)))
U6_g(T72, T73, T74, pA_out_g(.(T72, .(T73, T74)))) → pA_out_g(.(0, .(s(s(T72)), .(T73, T74))))
U6_g(T72, T73, T74, pA_out_g(.(T72, .(T73, T74)))) → U7_g(T72, T73, T74, pA_in_g(.(s(s(s(s(T73)))), T74)))
U7_g(T72, T73, T74, pA_out_g(.(s(s(s(s(T73)))), T74))) → pA_out_g(.(0, .(s(s(T72)), .(T73, T74))))
U4_g(T45, T46, pA_out_g(.(T45, T46))) → pA_out_g(.(s(s(0)), .(T45, T46)))
U4_g(T45, T46, pA_out_g(.(T45, T46))) → U5_g(T45, T46, pA_in_g(.(s(s(s(s(T45)))), T46)))
U5_g(T45, T46, pA_out_g(.(s(s(s(s(T45)))), T46))) → pA_out_g(.(s(s(0)), .(T45, T46)))
U1_g(T24, T25, T26, pA_out_g(.(T24, .(T25, T26)))) → pA_out_g(.(s(s(s(s(T24)))), .(T25, T26)))
U1_g(T24, T25, T26, pA_out_g(.(T24, .(T25, T26)))) → U2_g(T24, T25, T26, pA_in_g(.(s(s(s(s(T25)))), T26)))
U2_g(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → pA_out_g(.(s(s(s(s(T24)))), .(T25, T26)))
U2_g(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → U3_g(T24, T25, T26, pA_in_g(.(s(s(s(s(T25)))), T26)))
U3_g(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → pA_out_g(.(s(s(s(s(T24)))), .(T25, T26)))

Pi is empty.
We have to consider all (P,R,Pi)-chains

(7) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 4 less nodes.

(8) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

U1_G(T24, T25, T26, pA_out_g(.(T24, .(T25, T26)))) → U2_G(T24, T25, T26, pA_in_g(.(s(s(s(s(T25)))), T26)))
U2_G(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → PA_IN_G(.(s(s(s(s(T25)))), T26))
PA_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → U1_G(T24, T25, T26, pA_in_g(.(T24, .(T25, T26))))
U1_G(T24, T25, T26, pA_out_g(.(T24, .(T25, T26)))) → PA_IN_G(.(s(s(s(s(T25)))), T26))
PA_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → PA_IN_G(.(T24, .(T25, T26)))
PA_IN_G(.(s(s(0)), .(T45, T46))) → U4_G(T45, T46, pA_in_g(.(T45, T46)))
U4_G(T45, T46, pA_out_g(.(T45, T46))) → PA_IN_G(.(s(s(s(s(T45)))), T46))
PA_IN_G(.(s(s(0)), .(T45, T46))) → PA_IN_G(.(T45, T46))
PA_IN_G(.(0, .(s(s(T72)), .(T73, T74)))) → U6_G(T72, T73, T74, pA_in_g(.(T72, .(T73, T74))))
U6_G(T72, T73, T74, pA_out_g(.(T72, .(T73, T74)))) → PA_IN_G(.(s(s(s(s(T73)))), T74))
PA_IN_G(.(0, .(s(s(T72)), .(T73, T74)))) → PA_IN_G(.(T72, .(T73, T74)))
PA_IN_G(.(0, .(0, T83))) → PA_IN_G(T83)

The TRS R consists of the following rules:

pA_in_g(.(T3, [])) → pA_out_g(.(T3, []))
pA_in_g(.(s(s(s(s(T24)))), .(T25, T26))) → U1_g(T24, T25, T26, pA_in_g(.(T24, .(T25, T26))))
pA_in_g(.(s(s(0)), .(T45, T46))) → U4_g(T45, T46, pA_in_g(.(T45, T46)))
pA_in_g(.(0, .(T59, []))) → pA_out_g(.(0, .(T59, [])))
pA_in_g(.(0, .(s(s(T72)), .(T73, T74)))) → U6_g(T72, T73, T74, pA_in_g(.(T72, .(T73, T74))))
pA_in_g(.(0, .(0, T83))) → U8_g(T83, pA_in_g(T83))
U8_g(T83, pA_out_g(T83)) → pA_out_g(.(0, .(0, T83)))
U6_g(T72, T73, T74, pA_out_g(.(T72, .(T73, T74)))) → pA_out_g(.(0, .(s(s(T72)), .(T73, T74))))
U6_g(T72, T73, T74, pA_out_g(.(T72, .(T73, T74)))) → U7_g(T72, T73, T74, pA_in_g(.(s(s(s(s(T73)))), T74)))
U7_g(T72, T73, T74, pA_out_g(.(s(s(s(s(T73)))), T74))) → pA_out_g(.(0, .(s(s(T72)), .(T73, T74))))
U4_g(T45, T46, pA_out_g(.(T45, T46))) → pA_out_g(.(s(s(0)), .(T45, T46)))
U4_g(T45, T46, pA_out_g(.(T45, T46))) → U5_g(T45, T46, pA_in_g(.(s(s(s(s(T45)))), T46)))
U5_g(T45, T46, pA_out_g(.(s(s(s(s(T45)))), T46))) → pA_out_g(.(s(s(0)), .(T45, T46)))
U1_g(T24, T25, T26, pA_out_g(.(T24, .(T25, T26)))) → pA_out_g(.(s(s(s(s(T24)))), .(T25, T26)))
U1_g(T24, T25, T26, pA_out_g(.(T24, .(T25, T26)))) → U2_g(T24, T25, T26, pA_in_g(.(s(s(s(s(T25)))), T26)))
U2_g(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → pA_out_g(.(s(s(s(s(T24)))), .(T25, T26)))
U2_g(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → U3_g(T24, T25, T26, pA_in_g(.(s(s(s(s(T25)))), T26)))
U3_g(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → pA_out_g(.(s(s(s(s(T24)))), .(T25, T26)))

Pi is empty.
We have to consider all (P,R,Pi)-chains

(9) PiDPToQDPProof (EQUIVALENT transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(10) Obligation:

Q DP problem:
The TRS P consists of the following rules:

U1_G(T24, T25, T26, pA_out_g(.(T24, .(T25, T26)))) → U2_G(T24, T25, T26, pA_in_g(.(s(s(s(s(T25)))), T26)))
U2_G(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → PA_IN_G(.(s(s(s(s(T25)))), T26))
PA_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → U1_G(T24, T25, T26, pA_in_g(.(T24, .(T25, T26))))
U1_G(T24, T25, T26, pA_out_g(.(T24, .(T25, T26)))) → PA_IN_G(.(s(s(s(s(T25)))), T26))
PA_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → PA_IN_G(.(T24, .(T25, T26)))
PA_IN_G(.(s(s(0)), .(T45, T46))) → U4_G(T45, T46, pA_in_g(.(T45, T46)))
U4_G(T45, T46, pA_out_g(.(T45, T46))) → PA_IN_G(.(s(s(s(s(T45)))), T46))
PA_IN_G(.(s(s(0)), .(T45, T46))) → PA_IN_G(.(T45, T46))
PA_IN_G(.(0, .(s(s(T72)), .(T73, T74)))) → U6_G(T72, T73, T74, pA_in_g(.(T72, .(T73, T74))))
U6_G(T72, T73, T74, pA_out_g(.(T72, .(T73, T74)))) → PA_IN_G(.(s(s(s(s(T73)))), T74))
PA_IN_G(.(0, .(s(s(T72)), .(T73, T74)))) → PA_IN_G(.(T72, .(T73, T74)))
PA_IN_G(.(0, .(0, T83))) → PA_IN_G(T83)

The TRS R consists of the following rules:

pA_in_g(.(T3, [])) → pA_out_g(.(T3, []))
pA_in_g(.(s(s(s(s(T24)))), .(T25, T26))) → U1_g(T24, T25, T26, pA_in_g(.(T24, .(T25, T26))))
pA_in_g(.(s(s(0)), .(T45, T46))) → U4_g(T45, T46, pA_in_g(.(T45, T46)))
pA_in_g(.(0, .(T59, []))) → pA_out_g(.(0, .(T59, [])))
pA_in_g(.(0, .(s(s(T72)), .(T73, T74)))) → U6_g(T72, T73, T74, pA_in_g(.(T72, .(T73, T74))))
pA_in_g(.(0, .(0, T83))) → U8_g(T83, pA_in_g(T83))
U8_g(T83, pA_out_g(T83)) → pA_out_g(.(0, .(0, T83)))
U6_g(T72, T73, T74, pA_out_g(.(T72, .(T73, T74)))) → pA_out_g(.(0, .(s(s(T72)), .(T73, T74))))
U6_g(T72, T73, T74, pA_out_g(.(T72, .(T73, T74)))) → U7_g(T72, T73, T74, pA_in_g(.(s(s(s(s(T73)))), T74)))
U7_g(T72, T73, T74, pA_out_g(.(s(s(s(s(T73)))), T74))) → pA_out_g(.(0, .(s(s(T72)), .(T73, T74))))
U4_g(T45, T46, pA_out_g(.(T45, T46))) → pA_out_g(.(s(s(0)), .(T45, T46)))
U4_g(T45, T46, pA_out_g(.(T45, T46))) → U5_g(T45, T46, pA_in_g(.(s(s(s(s(T45)))), T46)))
U5_g(T45, T46, pA_out_g(.(s(s(s(s(T45)))), T46))) → pA_out_g(.(s(s(0)), .(T45, T46)))
U1_g(T24, T25, T26, pA_out_g(.(T24, .(T25, T26)))) → pA_out_g(.(s(s(s(s(T24)))), .(T25, T26)))
U1_g(T24, T25, T26, pA_out_g(.(T24, .(T25, T26)))) → U2_g(T24, T25, T26, pA_in_g(.(s(s(s(s(T25)))), T26)))
U2_g(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → pA_out_g(.(s(s(s(s(T24)))), .(T25, T26)))
U2_g(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → U3_g(T24, T25, T26, pA_in_g(.(s(s(s(s(T25)))), T26)))
U3_g(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → pA_out_g(.(s(s(s(s(T24)))), .(T25, T26)))

The set Q consists of the following terms:

pA_in_g(x0)
U8_g(x0, x1)
U6_g(x0, x1, x2, x3)
U7_g(x0, x1, x2, x3)
U4_g(x0, x1, x2)
U5_g(x0, x1, x2)
U1_g(x0, x1, x2, x3)
U2_g(x0, x1, x2, x3)
U3_g(x0, x1, x2, x3)

We have to consider all (P,Q,R)-chains.

(11) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.


U1_G(T24, T25, T26, pA_out_g(.(T24, .(T25, T26)))) → U2_G(T24, T25, T26, pA_in_g(.(s(s(s(s(T25)))), T26)))
U1_G(T24, T25, T26, pA_out_g(.(T24, .(T25, T26)))) → PA_IN_G(.(s(s(s(s(T25)))), T26))
U4_G(T45, T46, pA_out_g(.(T45, T46))) → PA_IN_G(.(s(s(s(s(T45)))), T46))
PA_IN_G(.(s(s(0)), .(T45, T46))) → PA_IN_G(.(T45, T46))
PA_IN_G(.(0, .(s(s(T72)), .(T73, T74)))) → U6_G(T72, T73, T74, pA_in_g(.(T72, .(T73, T74))))
PA_IN_G(.(0, .(s(s(T72)), .(T73, T74)))) → PA_IN_G(.(T72, .(T73, T74)))
PA_IN_G(.(0, .(0, T83))) → PA_IN_G(T83)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(.(x1, x2)) = 1 + x2   
POL(0) = 0   
POL(PA_IN_G(x1)) = x1   
POL(U1_G(x1, x2, x3, x4)) = 1 + x3 + x4   
POL(U1_g(x1, x2, x3, x4)) = 1   
POL(U2_G(x1, x2, x3, x4)) = 1 + x3   
POL(U2_g(x1, x2, x3, x4)) = 1   
POL(U3_g(x1, x2, x3, x4)) = 1   
POL(U4_G(x1, x2, x3)) = 1 + x2 + x3   
POL(U4_g(x1, x2, x3)) = 1   
POL(U5_g(x1, x2, x3)) = 1   
POL(U6_G(x1, x2, x3, x4)) = 1 + x3   
POL(U6_g(x1, x2, x3, x4)) = x4   
POL(U7_g(x1, x2, x3, x4)) = 1   
POL(U8_g(x1, x2)) = x2   
POL([]) = 0   
POL(pA_in_g(x1)) = 1   
POL(pA_out_g(x1)) = 1   
POL(s(x1)) = 0   

The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented:

pA_in_g(.(T3, [])) → pA_out_g(.(T3, []))
pA_in_g(.(s(s(s(s(T24)))), .(T25, T26))) → U1_g(T24, T25, T26, pA_in_g(.(T24, .(T25, T26))))
pA_in_g(.(s(s(0)), .(T45, T46))) → U4_g(T45, T46, pA_in_g(.(T45, T46)))
pA_in_g(.(0, .(T59, []))) → pA_out_g(.(0, .(T59, [])))
pA_in_g(.(0, .(s(s(T72)), .(T73, T74)))) → U6_g(T72, T73, T74, pA_in_g(.(T72, .(T73, T74))))
pA_in_g(.(0, .(0, T83))) → U8_g(T83, pA_in_g(T83))
U1_g(T24, T25, T26, pA_out_g(.(T24, .(T25, T26)))) → pA_out_g(.(s(s(s(s(T24)))), .(T25, T26)))
U4_g(T45, T46, pA_out_g(.(T45, T46))) → pA_out_g(.(s(s(0)), .(T45, T46)))
U6_g(T72, T73, T74, pA_out_g(.(T72, .(T73, T74)))) → pA_out_g(.(0, .(s(s(T72)), .(T73, T74))))
U8_g(T83, pA_out_g(T83)) → pA_out_g(.(0, .(0, T83)))
U6_g(T72, T73, T74, pA_out_g(.(T72, .(T73, T74)))) → U7_g(T72, T73, T74, pA_in_g(.(s(s(s(s(T73)))), T74)))
U7_g(T72, T73, T74, pA_out_g(.(s(s(s(s(T73)))), T74))) → pA_out_g(.(0, .(s(s(T72)), .(T73, T74))))
U4_g(T45, T46, pA_out_g(.(T45, T46))) → U5_g(T45, T46, pA_in_g(.(s(s(s(s(T45)))), T46)))
U5_g(T45, T46, pA_out_g(.(s(s(s(s(T45)))), T46))) → pA_out_g(.(s(s(0)), .(T45, T46)))
U1_g(T24, T25, T26, pA_out_g(.(T24, .(T25, T26)))) → U2_g(T24, T25, T26, pA_in_g(.(s(s(s(s(T25)))), T26)))
U2_g(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → pA_out_g(.(s(s(s(s(T24)))), .(T25, T26)))
U2_g(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → U3_g(T24, T25, T26, pA_in_g(.(s(s(s(s(T25)))), T26)))
U3_g(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → pA_out_g(.(s(s(s(s(T24)))), .(T25, T26)))

(12) Obligation:

Q DP problem:
The TRS P consists of the following rules:

U2_G(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → PA_IN_G(.(s(s(s(s(T25)))), T26))
PA_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → U1_G(T24, T25, T26, pA_in_g(.(T24, .(T25, T26))))
PA_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → PA_IN_G(.(T24, .(T25, T26)))
PA_IN_G(.(s(s(0)), .(T45, T46))) → U4_G(T45, T46, pA_in_g(.(T45, T46)))
U6_G(T72, T73, T74, pA_out_g(.(T72, .(T73, T74)))) → PA_IN_G(.(s(s(s(s(T73)))), T74))

The TRS R consists of the following rules:

pA_in_g(.(T3, [])) → pA_out_g(.(T3, []))
pA_in_g(.(s(s(s(s(T24)))), .(T25, T26))) → U1_g(T24, T25, T26, pA_in_g(.(T24, .(T25, T26))))
pA_in_g(.(s(s(0)), .(T45, T46))) → U4_g(T45, T46, pA_in_g(.(T45, T46)))
pA_in_g(.(0, .(T59, []))) → pA_out_g(.(0, .(T59, [])))
pA_in_g(.(0, .(s(s(T72)), .(T73, T74)))) → U6_g(T72, T73, T74, pA_in_g(.(T72, .(T73, T74))))
pA_in_g(.(0, .(0, T83))) → U8_g(T83, pA_in_g(T83))
U8_g(T83, pA_out_g(T83)) → pA_out_g(.(0, .(0, T83)))
U6_g(T72, T73, T74, pA_out_g(.(T72, .(T73, T74)))) → pA_out_g(.(0, .(s(s(T72)), .(T73, T74))))
U6_g(T72, T73, T74, pA_out_g(.(T72, .(T73, T74)))) → U7_g(T72, T73, T74, pA_in_g(.(s(s(s(s(T73)))), T74)))
U7_g(T72, T73, T74, pA_out_g(.(s(s(s(s(T73)))), T74))) → pA_out_g(.(0, .(s(s(T72)), .(T73, T74))))
U4_g(T45, T46, pA_out_g(.(T45, T46))) → pA_out_g(.(s(s(0)), .(T45, T46)))
U4_g(T45, T46, pA_out_g(.(T45, T46))) → U5_g(T45, T46, pA_in_g(.(s(s(s(s(T45)))), T46)))
U5_g(T45, T46, pA_out_g(.(s(s(s(s(T45)))), T46))) → pA_out_g(.(s(s(0)), .(T45, T46)))
U1_g(T24, T25, T26, pA_out_g(.(T24, .(T25, T26)))) → pA_out_g(.(s(s(s(s(T24)))), .(T25, T26)))
U1_g(T24, T25, T26, pA_out_g(.(T24, .(T25, T26)))) → U2_g(T24, T25, T26, pA_in_g(.(s(s(s(s(T25)))), T26)))
U2_g(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → pA_out_g(.(s(s(s(s(T24)))), .(T25, T26)))
U2_g(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → U3_g(T24, T25, T26, pA_in_g(.(s(s(s(s(T25)))), T26)))
U3_g(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → pA_out_g(.(s(s(s(s(T24)))), .(T25, T26)))

The set Q consists of the following terms:

pA_in_g(x0)
U8_g(x0, x1)
U6_g(x0, x1, x2, x3)
U7_g(x0, x1, x2, x3)
U4_g(x0, x1, x2)
U5_g(x0, x1, x2)
U1_g(x0, x1, x2, x3)
U2_g(x0, x1, x2, x3)
U3_g(x0, x1, x2, x3)

We have to consider all (P,Q,R)-chains.

(13) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 4 less nodes.

(14) Obligation:

Q DP problem:
The TRS P consists of the following rules:

PA_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → PA_IN_G(.(T24, .(T25, T26)))

The TRS R consists of the following rules:

pA_in_g(.(T3, [])) → pA_out_g(.(T3, []))
pA_in_g(.(s(s(s(s(T24)))), .(T25, T26))) → U1_g(T24, T25, T26, pA_in_g(.(T24, .(T25, T26))))
pA_in_g(.(s(s(0)), .(T45, T46))) → U4_g(T45, T46, pA_in_g(.(T45, T46)))
pA_in_g(.(0, .(T59, []))) → pA_out_g(.(0, .(T59, [])))
pA_in_g(.(0, .(s(s(T72)), .(T73, T74)))) → U6_g(T72, T73, T74, pA_in_g(.(T72, .(T73, T74))))
pA_in_g(.(0, .(0, T83))) → U8_g(T83, pA_in_g(T83))
U8_g(T83, pA_out_g(T83)) → pA_out_g(.(0, .(0, T83)))
U6_g(T72, T73, T74, pA_out_g(.(T72, .(T73, T74)))) → pA_out_g(.(0, .(s(s(T72)), .(T73, T74))))
U6_g(T72, T73, T74, pA_out_g(.(T72, .(T73, T74)))) → U7_g(T72, T73, T74, pA_in_g(.(s(s(s(s(T73)))), T74)))
U7_g(T72, T73, T74, pA_out_g(.(s(s(s(s(T73)))), T74))) → pA_out_g(.(0, .(s(s(T72)), .(T73, T74))))
U4_g(T45, T46, pA_out_g(.(T45, T46))) → pA_out_g(.(s(s(0)), .(T45, T46)))
U4_g(T45, T46, pA_out_g(.(T45, T46))) → U5_g(T45, T46, pA_in_g(.(s(s(s(s(T45)))), T46)))
U5_g(T45, T46, pA_out_g(.(s(s(s(s(T45)))), T46))) → pA_out_g(.(s(s(0)), .(T45, T46)))
U1_g(T24, T25, T26, pA_out_g(.(T24, .(T25, T26)))) → pA_out_g(.(s(s(s(s(T24)))), .(T25, T26)))
U1_g(T24, T25, T26, pA_out_g(.(T24, .(T25, T26)))) → U2_g(T24, T25, T26, pA_in_g(.(s(s(s(s(T25)))), T26)))
U2_g(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → pA_out_g(.(s(s(s(s(T24)))), .(T25, T26)))
U2_g(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → U3_g(T24, T25, T26, pA_in_g(.(s(s(s(s(T25)))), T26)))
U3_g(T24, T25, T26, pA_out_g(.(s(s(s(s(T25)))), T26))) → pA_out_g(.(s(s(s(s(T24)))), .(T25, T26)))

The set Q consists of the following terms:

pA_in_g(x0)
U8_g(x0, x1)
U6_g(x0, x1, x2, x3)
U7_g(x0, x1, x2, x3)
U4_g(x0, x1, x2)
U5_g(x0, x1, x2)
U1_g(x0, x1, x2, x3)
U2_g(x0, x1, x2, x3)
U3_g(x0, x1, x2, x3)

We have to consider all (P,Q,R)-chains.

(15) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(16) Obligation:

Q DP problem:
The TRS P consists of the following rules:

PA_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → PA_IN_G(.(T24, .(T25, T26)))

R is empty.
The set Q consists of the following terms:

pA_in_g(x0)
U8_g(x0, x1)
U6_g(x0, x1, x2, x3)
U7_g(x0, x1, x2, x3)
U4_g(x0, x1, x2)
U5_g(x0, x1, x2)
U1_g(x0, x1, x2, x3)
U2_g(x0, x1, x2, x3)
U3_g(x0, x1, x2, x3)

We have to consider all (P,Q,R)-chains.

(17) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

pA_in_g(x0)
U8_g(x0, x1)
U6_g(x0, x1, x2, x3)
U7_g(x0, x1, x2, x3)
U4_g(x0, x1, x2)
U5_g(x0, x1, x2)
U1_g(x0, x1, x2, x3)
U2_g(x0, x1, x2, x3)
U3_g(x0, x1, x2, x3)

(18) Obligation:

Q DP problem:
The TRS P consists of the following rules:

PA_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → PA_IN_G(.(T24, .(T25, T26)))

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(19) UsableRulesReductionPairsProof (EQUIVALENT transformation)

By using the usable rules with reduction pair processor [LPAR04] with a polynomial ordering [POLO], all dependency pairs and the corresponding usable rules [FROCOS05] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

The following dependency pairs can be deleted:

PA_IN_G(.(s(s(s(s(T24)))), .(T25, T26))) → PA_IN_G(.(T24, .(T25, T26)))
No rules are removed from R.

Used ordering: POLO with Polynomial interpretation [POLO]:

POL(.(x1, x2)) = x1 + x2   
POL(PA_IN_G(x1)) = x1   
POL(s(x1)) = x1   

(20) Obligation:

Q DP problem:
P is empty.
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(21) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(22) YES